<?php
declare (strict_types=1);

namespace app\common\model;

class News extends Base
{
    protected $name = 'news';

    public function getTypeAttr($value)
    {
        switch ($value) {
            case 1:
                return '新闻';
            case 2:
                return '公告';
            default:
                return '新闻';
        }
    }

    public function getContentAttr($value)
    {
        return htmlspecialchars_decode($value);
    }


}
